package cn.ilikes.tools.nosql.test.jpa.pojos;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.ilikes.tools.nosql.jpa.annotations.IndexColumn;

@Entity
@Table(name = "pe_role_module_maps", schema = "ilikes")
public class RoleModuleMaps {

	@Id
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "id", store = IndexColumn.Store.yes)
	private Integer uuid;

	@Column(name = "show_name")
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "showName", store = IndexColumn.Store.yes)
	private String showName;

	//-1 not open  1 open
	@Column(name = "status")
	private Integer status;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "role_id")
	private Role role;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "module_id")
	private Module modules;

	public Integer getUuid() {
		return uuid;
	}

	public void setUuid(Integer uuid) {
		this.uuid = uuid;
	}

	public String getShowName() {
		return showName;
	}

	public void setShowName(String showName) {
		this.showName = showName;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Module getModules() {
		return modules;
	}

	public void setModules(Module modules) {
		this.modules = modules;
	}

}
